package march.test_3_24;

import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int a = scanner.nextInt();
            System.out.print(a+" =");
            result(a);
            System.out.println();
        }
    }
    public static void result(int a) {
        if(isOk(a)) {
            System.out.print(" "+(int)a);
            return;
        }
        for(int i = 2; i < a/2; i++) {
            if(a % i == 0) {
                a = a / i ;
                System.out.print(" " + i + " *");
                break;
            }
        }
        result(a);
    }
    public static boolean isOk(int n) {
        for (int i = 2; i < n / 2; i++) {
            if(n % i == 0) {
                return false;
            }
        }
        return true;
    }
}
